package com.ssy.lingxi.purchase.repository.bidding;

import com.ssy.lingxi.purchase.entity.bidding.Bidding;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
*采购竞价
*/
@Repository
public interface BiddingRepository extends JpaRepository<Bidding, Long>, JpaSpecificationExecutor<Bidding>, QuerydslPredicateExecutor<Bidding> {

    Bidding findByIdAndCreateMemberIdAndCreateMemberRoleId(Long id,Long memberId,Long memberRoleId);

    Bidding findByBiddingNoAndCreateMemberIdAndCreateMemberRoleId(String biddingNo,Long memberId,Long memberRoleId);

    Bidding findByBiddingNo(String biddingNo);

    List<Bidding> findAllByCreateMemberIdAndCreateMemberRoleIdAndIdIn(Long memberId,Long memberRoleId,List<Long> ids);
}
